
#ifndef DESIGN_PATTERNS_COMPOSITE_CART_H_
#define DESIGN_PATTERNS_COMPOSITE_CART_H_

#include <set>
#include "Commodity.h"

class Cart : public Commodity
{
private:
  typedef std::set<Commodity*> CommSet;

  CommSet comm_set_;
public:
  Cart(std::string name, double price_per);

  void Add(Commodity* c) override;

  void Remove(Commodity* c) override;

  double CheckOut() override;

  ~Cart() override;
};

#endif //DESIGN_PATTERNS_COMPOSITE_CART_H_
